﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;


namespace EZCRS.HCMS.Entity
{
    #region HCRS_Train
    /// <summary>
    /// This object represents the properties and methods of a H_train.
    /// </summary>
    public class HCRS_Train
    {
        private int? _id;
        private int? _property_id;
        private string _trainTrans = String.Empty;
        private string _trainName = String.Empty;
        private string _trainDirection = String.Empty;
        private int? _trainDistance;
        private string _trainUnits = String.Empty;

        public HCRS_Train()
        {
        }



        public HCRS_Train(DataRow dr)
        {
            if (dr != null)
            {
                _id = Convert.ToInt32(dr["id"].ToString());
                _property_id = Convert.ToInt32(dr["property_id"].ToString());
                _trainTrans = dr["traintrans"].ToString();
                _trainName = dr["trainname"].ToString();
                _trainDirection = dr["traindirection"].ToString();
                _trainDistance = (dr["traindistance"].ToString() != "") ? Convert.ToInt32(dr["traindistance"].ToString()) : 0;
                _trainUnits = dr["trainunits"].ToString();
            }
        }

       

        #region Public Properties
        [DataFieldAttribute("Id", "pk")]
        public int? Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public int? Property_id
        {
            get { return _property_id; }
            set { _property_id = value; }
        }

        public string TrainTrans
        {
            get { return _trainTrans; }
            set { _trainTrans = value; }
        }

        public string TrainName
        {
            get { return _trainName; }
            set { _trainName = value; }
        }

        public string TrainDirection
        {
            get { return _trainDirection; }
            set { _trainDirection = value; }
        }

        public int? TrainDistance
        {
            get { return _trainDistance; }
            set { _trainDistance = value; }
        }

        public string TrainUnits
        {
            get { return _trainUnits; }
            set { _trainUnits = value; }
        }
        #endregion

    }
    #endregion
}
